import http from "../http"
import {getUserId} from "../../store";
/**
 * 新增废品订单
 * @returns
 */
export function addWasteOrder(data) {
    return http.post(`/waste-order`,data, {
        msg: false,
        token: true,
        load: false
    });
}

/**
 * 分页查询订单 禁用 无vo
 * @param {number} page
 * @param {number} size
 * @returns
 */
export function getOrders(page, size) {
    return http.get(`/waste-order?page=${page}&size=${size}&userId=${getUserId()}`,{
        msg: false,
        token: true,
        load: false
    });
}

/**
 * 获取订单详情
 * @param {string} id
 * @returns
 */
export function getOrderById(id) {
    return http.get(`/waste-order/${id}`,{
        msg: false,
        token: true,
        load: false
    });
}